<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
 
// load tooltip behavior
JHtml::_('behavior.tooltip');
?>
<form action="<?php echo JRoute::_('index.php?option=com_shop'); ?>"   method="post" name="adminForm" enctype="multipart/form-data">
<div class="width-60 fltlft">
		<fieldset class="adminform">
			<legend>Danh mục ngành nghề</legend>
			<ul class="adminformlist">
				<li><label id="title" for="" class="required" title="">Tiêu đề<span class="star">&nbsp;*</span></label>
                <input type="text" name="title" id="title" value="<?php echo $this->item->title; ?>" class="inputbox required" size="50" aria-required="true" required="required"></li>
				<li><label id="alias" for="alias" title="">Alias</label>
                <input type="text" name="alias" id="alias" value="<?php echo $this->item->alias; ?>" class="inputbox" size="50"></li>
                <li>
                <label id="state" for="state">Bật</label>
			<select name="state" class="inputbox">
				<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
				<?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->item->state, true);?>
			</select>
                </li>
                <label id="home" for="home">Trang chủ</label>
			<select name="home" class="inputbox">
				<?php echo JHtml::_('select.options', $this->homePageArray(), 'value', 'text', $this->item->home, true);?>
			</select>
                </li>
                <label id="parent_id" for="parent_id">Danh mục cha</label>
			<select name="parent_id" class="inputbox">
            	<option value="0"><?php echo  JText::_('JGLOBAL_ROOT_PARENT'); ?></option>
				<?php echo JHtml::_('select.options', $this->getOptions(), 'value', 'text', $this->item->parent_id, true);?>
			</select>
                </li>
                <li>
                 <label id="upload_file" for="upload_file">Ảnh danh mục</label>
                 <input type="file" name="upload_file" />
                </li>
			</ul>
            <div class="clr"></div>
            <?php if($this->item->image != ''): ?>
            <img src="<?php echo JURI::root().'images/image_category/thumb/'.$this->item->image; ?>" width="50" height="50" style="margin-left:150px;" />
            <?php endif; ?>
            <div class="clr"></div>
            <label>Mô tả danh mục</label>
            <div class="clr"></div>
            <?php 
			$editor =& JFactory::getEditor();
echo $editor->display('description', $this->item->description , '100%', '400', '60', '20', true);
			
			?>
		</fieldset>
</div>
<input type="hidden" name="task" value="" />
<input type="hidden" name="id" value="<?php echo $this->item->id; ?>" />
<input type="hidden" name="image" value="<?php echo $this->item->image; ?>" />
<input type="hidden" name="ordering" value="<?php echo $this->item->ordering; ?>" />
<input type="hidden" name="old_parent" value="<?php echo $this->item->parent_id; ?>" />

<?php echo JHtml::_('form.token'); ?>
</form>
<style>
.boximage{}
</style>